package org.khd.gift.controller;

import org.khd.gift.service.IVerifyCodeService;
import org.khd.gift.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/verifyCode")
public class VerifyCodeController {

    @Autowired
    private IVerifyCodeService verifyCodeService;

    @PostMapping("/userRegister/sms/{phone}")
    public AjaxResult userRegisterSendSmsCode(@PathVariable("phone") String phone){
        verifyCodeService.userRegisterSendSmsCode(phone);

        return AjaxResult.me();
    }
}
